package com.golddaymicromall.activity.storemanager;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.golddaymicromall.activity.R;
import com.golddaymicromall.base.BaseActivity;
import com.golddaymicromall.bitmap.createQRImage;

public class DisplayQrActivity extends BaseActivity implements View.OnClickListener{

    private ImageView mQRImage;
    private LinearLayout mScannerBack;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_display_qr);
        initView();
        String url = getIntent().getStringExtra("url");
        mQRImage.setImageBitmap(new createQRImage().createQRImage(url, 500, 500));
    }

    public void initView(){
        mQRImage = (ImageView) findViewById(R.id.add_qrImage);
        mScannerBack = (LinearLayout) findViewById(R.id.scanner_back);
        mScannerBack.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.scanner_back:
                finish();
                break;
        }
    }
}
